package com.neusoft.elmboot.mapper;

import java.math.BigDecimal;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface VirtualWalletMapper {
	
	@Select("select walletId from virtualwallet where userId=#{userId}")
	Long getWalletIdByUserId(String userId);
	
	@Select("select balance from virtualwallet where walletId=#{walletId}")
	BigDecimal getBalanceByWalletId(Long walletId);
	
	@Update("update virtualwallet set balance=#{balance} where walletId=#{walletId}")
	public int updateBalance(Long walletId,BigDecimal balance);
}
